package net.example.model.contract;

import net.example.utils.SerializeHelper;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import io.netty.buffer.ByteBuf;

public class ManageGroupMembersNotifyContract {

    public boolean ServerCommand ;
    public String OperatorID ;
    public List<String> GuestList ;

    public ManageGroupMembersNotifyContract(){}

    public void deserialize(byte[] info) throws IOException {
        ByteBuf buffer = SerializeHelper.wrappedBuffer(info);
        buffer.readInt();
        int count= buffer.readInt();
        this.GuestList =new ArrayList<>();
        for (int i=0;i<count;i++   )
        {
            this.GuestList.add(SerializeHelper.readStrIntLen(buffer));
        }
        this.OperatorID=SerializeHelper.readStrIntLen(buffer);
        this.ServerCommand = buffer.readBoolean();
    }
}
